Skip to content

feat(nitro): Nitro SDK#19224

Merged
logaretm merged 26 commits intodevelopfrom
awad/create-nitro-sdk-metadata
Apr 23, 2026
Merged

feat(nitro): Nitro SDK#19224
logaretm merged 26 commits intodevelopfrom
awad/create-nitro-sdk-metadata

Conversation

@logaretm
Copy link
Copy Markdown
Member

@logaretm logaretm commented Feb 6, 2026

This PR just isolates the mundane changes needed for a new SDK to keep the next stacked PRs clean, it adds the Nitro SDK to the monorepo.

This PR is a base of a stack, the stacked PRs will be merged into it. I thought this will be easier to review.


This PR is part of a stack:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 10,850 - 9,029 +20%
GET With Sentry 1,689 16% 1,578 +7%
GET With Sentry (error only) 7,026 65% 5,938 +18%
POST Baseline 1,044 - 1,193 -12%
POST With Sentry 490 47% 566 -13%
POST With Sentry (error only) 915 88% 1,035 -12%
MYSQL Baseline 3,653 - 3,285 +11%
MYSQL With Sentry 360 10% 405 -11%
MYSQL With Sentry (error only) 2,881 79% 2,652 +9%

View base workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.88 kB - -
@sentry/browser - with treeshaking flags 24.35 kB - -
@sentry/browser (incl. Tracing) 43.8 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 45.5 kB - -
@sentry/browser (incl. Tracing, Profiling) 48.73 kB - -
@sentry/browser (incl. Tracing, Replay) 82.98 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.5 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 87.67 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 99.93 kB - -
@sentry/browser (incl. Feedback) 42.7 kB - -
@sentry/browser (incl. sendFeedback) 30.55 kB - -
@sentry/browser (incl. FeedbackAsync) 35.55 kB - -
@sentry/browser (incl. Metrics) 27.16 kB - -
@sentry/browser (incl. Logs) 27.29 kB - -
@sentry/browser (incl. Metrics & Logs) 27.98 kB - -
@sentry/react 27.62 kB - -
@sentry/react (incl. Tracing) 46.05 kB - -
@sentry/vue 30.71 kB - -
@sentry/vue (incl. Tracing) 45.62 kB - -
@sentry/svelte 25.89 kB - -
CDN Bundle 28.57 kB - -
CDN Bundle (incl. Tracing) 46.08 kB - -
CDN Bundle (incl. Logs, Metrics) 29.95 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 47.12 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.92 kB - -
CDN Bundle (incl. Tracing, Replay) 83.14 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 84.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 88.61 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 89.69 kB - -
CDN Bundle - uncompressed 83.59 kB - -
CDN Bundle (incl. Tracing) - uncompressed 137.62 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.73 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 141.03 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 211.31 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 255.06 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 258.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 267.97 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 271.36 kB - -
@sentry/nextjs (client) 48.58 kB - -
@sentry/sveltekit (client) 44.22 kB - -
@sentry/node-core 58.35 kB +0.02% +9 B 🔺
@sentry/node 175.66 kB +0.01% +13 B 🔺
@sentry/node - without tracing 98.3 kB +0.02% +11 B 🔺
@sentry/aws-serverless 115.33 kB +0.02% +14 B 🔺

View base workflow run

@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch 2 times, most recently from 1317257 to 2a86160 Compare February 23, 2026 14:51
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 99ea611 to 9ded4c9 Compare April 15, 2026 13:10
@logaretm logaretm changed the title feat(nitro): Nitro SDK entry and metadata feat(nitro): Nitro SDK Apr 15, 2026
Comment thread yarn.lock Outdated
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 53bf486 to 5f43f63 Compare April 15, 2026 13:15
@logaretm logaretm marked this pull request as ready for review April 15, 2026 17:16
@logaretm logaretm requested review from JPeer264, Copilot and s1gr1d April 15, 2026 17:16
Comment thread packages/nitro/src/sdk.ts Outdated
Comment thread packages/nitro/test/index.test.ts
Comment thread packages/nitro/package.json Outdated
Comment thread packages/nitro/tsconfig.types.json Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new @sentry/nitro package skeleton to the monorepo and wires it into the repo’s release/testing/triage infrastructure as the base for a stacked series of Nitro SDK PRs.

Changes:

  • Introduces the new packages/nitro package with initial SDK/config scaffolding, build config, and a placeholder test.
  • Registers the package across monorepo plumbing (workspace list, root README, issue templates/labeling, release config).
  • Updates lockfile for the newly introduced dependency graph.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
yarn.lock Lockfile updates due to dependency graph changes.
packages/nitro/package.json New package manifest, exports, build/test scripts.
packages/nitro/rollup.npm.config.mjs Rollup config for publishing builds (ESM-only).
packages/nitro/tsconfig.json Package TS config (module/moduleResolution overrides).
packages/nitro/tsconfig.types.json Declaration-only build config for emitted types.
packages/nitro/tsconfig.test.json Test TS config for package tests.
packages/nitro/src/index.ts Public entrypoint re-exporting config + @sentry/node + Nitro init.
packages/nitro/src/sdk.ts Nitro SDK initialization wrapper around @sentry/node.
packages/nitro/src/config.ts withSentryConfig / module setup helper for Nitro config.
packages/nitro/src/module.ts Nitro module factory placeholder.
packages/nitro/src/common/debug-build.ts Debug-build flag constant (pattern consistent with other packages).
packages/nitro/src/utils/resolver.ts Path resolver helper utility.
packages/nitro/src/utils/plugin.ts Helper to add Nitro plugins.
packages/nitro/test/index.test.ts Placeholder Vitest test.
packages/nitro/test/tsconfig.json Test tsconfig shim extending package test config.
packages/nitro/README.md Initial package documentation.
packages/nitro/LICENSE Package license file.
packages/nitro/.eslintrc.js Package-local ESLint config extending repo base.
package.json Adds packages/nitro to workspace list.
dev-packages/e2e-tests/verdaccio-config/config.yaml Allows publishing @sentry/nitro in Verdaccio E2E setup.
README.md Adds @sentry/nitro to root package list.
.github/workflows/issue-package-label.yml Adds Nitro to package-to-label mapping.
.github/ISSUE_TEMPLATE/bug.yml Adds @sentry/nitro to bug template SDK dropdown.
.craft.yml Adds Nitro package to Craft release targets/metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/nitro/src/sdk.ts
Comment thread packages/nitro/src/sdk.ts
Comment thread packages/nitro/package.json Outdated
Comment thread packages/nitro/README.md
Comment thread packages/nitro/src/config.ts Outdated
Comment thread packages/nitro/README.md Outdated
Comment thread packages/nitro/src/config.ts Outdated
Comment thread packages/nitro/tsconfig.types.json Outdated
Comment thread packages/nitro/test/index.test.ts
Comment thread packages/nitro/src/sdk.ts Outdated
Comment thread packages/nitro/src/config.ts Outdated
Comment thread packages/nitro/LICENSE Outdated
Comment thread packages/nitro/package.json Outdated
Comment thread packages/nitro/package.json Outdated
Comment thread packages/nitro/README.md Outdated
Comment thread packages/nitro/README.md Outdated
Comment thread packages/nitro/README.md Outdated
Comment thread .craft.yml
@logaretm logaretm requested a review from s1gr1d April 16, 2026 13:59
@logaretm
Copy link
Copy Markdown
Member Author

Thank you for all comments @s1gr1d very thorough review! all addressed 🙏

Comment thread packages/nitro/src/index.ts
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 5f3baf0 to 1dad524 Compare April 16, 2026 14:53
@logaretm logaretm changed the base branch from develop to awad/tracing-channel-otel-vendoring April 16, 2026 14:53
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 1dad524 to 120ecba Compare April 16, 2026 16:19
logaretm and others added 17 commits April 23, 2026 09:56
- Update LICENSE copyright year to 2026
- Expand peerDependencies range to cover nitro prereleases
- Bump nitro devDependency to latest beta
- Add beta notice to README
- Improve README wording (section title, Vite capitalization, --import mention)
- Point .craft.yml docs URL to package README until docs page exists
- Include 'node' in applySdkMetadata packages list for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The repo uses Oxlint, not ESLint. Remove the legacy .eslintrc.js file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements HTTP server instrumentation for both `h3` and `srvx` by
listening to their tracing channel events.

- `h3` TC PR: h3js/h3#1251
- `srvx` TC PR: h3js/srvx#141

Closes #18123

---

**This PR is part of a stack:**

- #20358
- #19224
- #19225 👈
- #19304

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds automatic sourcemap handling to the Nitro SDK, using
`@sentry/bundler-plugin-core` for builder-agnostic post-build upload.

Nitro uses rollup or rolldown, so it made sense to make it as agnostic
as possible.

Closes #17992 

---

**This PR is part of a stack:**

- #20358
- #19224
- #19225
- #19304 👈

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nitro 3 is ESM-only, so the cjs output was shipping dead code. Also
removes a broken typesVersions entry pointing at build/types/plugins.d.ts
(file never existed, no consumer imports @sentry/nitro/plugins).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Align with Bun/Deno/Cloudflare SDKs by guarding the default integrations
computation behind an undefined check instead of relying on spread order.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@logaretm logaretm force-pushed the awad/create-nitro-sdk-metadata branch from 830ac6e to a62ff3c Compare April 23, 2026 13:57
logaretm and others added 2 commits April 23, 2026 10:47
The URL constructor throws on relative paths like `/api/users`, causing
the transaction name and root span updates to be silently skipped. Use
parseUrl from @sentry/core, which handles relative URLs correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
E2E tests now install @sentry packages from packed tarballs under
dev-packages/e2e-tests/packed/ rather than a local verdaccio registry,
so the .npmrc and "latest || *" version specifiers are no longer needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread packages/nitro/src/runtime/hooks/captureErrorHook.ts
logaretm and others added 4 commits April 23, 2026 11:11
CI's ciPnpmOverrides script already pins @sentry/* deps to the packed
tarballs, so the "latest || *" specifiers are sufficient. Keep only the
.npmrc removal from the previous commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `keywords`, `lint:fix` script, and `nx.targets` build config to package.json
- Link to the nitro-3 e2e app from the README
- Point `.craft.yml` `mainDocsUrl` to the docs page
- Add a CHANGELOG unreleased entry for the new SDK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove the `exclude` and "built separately" comment referencing
`src/setup.ts` and `tsconfig.setup-types.json`, both of which no longer
exist in the package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 000b7b0. Configure here.

Comment thread packages/nitro/src/runtime/hooks/captureErrorHook.ts
@logaretm logaretm merged commit 8f32e18 into develop Apr 23, 2026
484 of 489 checks passed
@logaretm logaretm deleted the awad/create-nitro-sdk-metadata branch April 23, 2026 16:45
logaretm added a commit that referenced this pull request Apr 24, 2026
There is no stable stream of Nitro 3 canary builds yet, so no point in
having this. I will add it back once we have a stable stream of builds,
likely after the full v3 release.

I probably had it at one point then didn't remove it properly before
merging #19224

Closes #20472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants